3.2.3 \(\int \frac {(a+b \log (c x^n))^2}{(d+e x)^2} \, dx\) [103]

Optimal. Leaf size=77 \[ \frac {x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{d e}-\frac {2 b^2 n^2 \text {Li}_2\left (-\frac {e x}{d}\right )}{d e} \]

[Out]

x*(a+b*ln(c*x^n))^2/d/(e*x+d)-2*b*n*(a+b*ln(c*x^n))*ln(1+e*x/d)/d/e-2*b^2*n^2*polylog(2,-e*x/d)/d/e

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {2355, 2354, 2438} \begin {gather*} -\frac {2 b^2 n^2 \text {PolyLog}\left (2,-\frac {e x}{d}\right )}{d e}-\frac {2 b n \log \left (\frac {e x}{d}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{d e}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/(d + e*x)^2,x]

[Out]

(x*(a + b*Log[c*x^n])^2)/(d*(d + e*x)) - (2*b*n*(a + b*Log[c*x^n])*Log[1 + (e*x)/d])/(d*e) - (2*b^2*n^2*PolyLo
g[2, -((e*x)/d)])/(d*e)

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2355

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_))^2, x_Symbol] :> Simp[x*((a + b*Log[c*x^n])
^p/(d*(d + e*x))), x] - Dist[b*n*(p/d), Int[(a + b*Log[c*x^n])^(p - 1)/(d + e*x), x], x] /; FreeQ[{a, b, c, d,
 e, n, p}, x] && GtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{(d+e x)^2} \, dx &=\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)}-\frac {(2 b n) \int \frac {a+b \log \left (c x^n\right )}{d+e x} \, dx}{d}\\ &=\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{d e}+\frac {\left (2 b^2 n^2\right ) \int \frac {\log \left (1+\frac {e x}{d}\right )}{x} \, dx}{d e}\\ &=\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{d (d+e x)}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {e x}{d}\right )}{d e}-\frac {2 b^2 n^2 \text {Li}_2\left (-\frac {e x}{d}\right )}{d e}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 81, normalized size = 1.05 \begin {gather*} \frac {\left (a+b \log \left (c x^n\right )\right ) \left (a e x+b e x \log \left (c x^n\right )-2 b n (d+e x) \log \left (1+\frac {e x}{d}\right )\right )-2 b^2 n^2 (d+e x) \text {Li}_2\left (-\frac {e x}{d}\right )}{d e (d+e x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/(d + e*x)^2,x]

[Out]

((a + b*Log[c*x^n])*(a*e*x + b*e*x*Log[c*x^n] - 2*b*n*(d + e*x)*Log[1 + (e*x)/d]) - 2*b^2*n^2*(d + e*x)*PolyLo
g[2, -((e*x)/d)])/(d*e*(d + e*x))

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.14, size = 755, normalized size = 9.81

method result size
risch \(\frac {i \ln \left (x^{n}\right ) b^{2} \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{\left (e x +d \right ) e}+\frac {i n \ln \left (x \right ) b^{2} \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{e d}+\frac {i \ln \left (x^{n}\right ) b^{2} \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{\left (e x +d \right ) e}-\frac {i n \ln \left (e x +d \right ) b^{2} \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{e d}-\frac {i n \ln \left (e x +d \right ) b^{2} \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{e d}+\frac {i n \ln \left (x \right ) b^{2} \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{e d}-\frac {2 b n \ln \left (e x +d \right ) a}{e d}+\frac {2 b n \ln \left (x \right ) a}{e d}-\frac {2 n \ln \left (e x +d \right ) b^{2} \ln \left (c \right )}{e d}+\frac {2 n \ln \left (x \right ) b^{2} \ln \left (c \right )}{e d}-\frac {i \ln \left (x^{n}\right ) b^{2} \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{\left (e x +d \right ) e}-\frac {2 b^{2} n \ln \left (e x +d \right ) \ln \left (x^{n}\right )}{e d}+\frac {2 b^{2} n \ln \left (x^{n}\right ) \ln \left (x \right )}{e d}-\frac {i n \ln \left (x \right ) b^{2} \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{e d}+\frac {i n \ln \left (e x +d \right ) b^{2} \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}}{e d}-\frac {i \ln \left (x^{n}\right ) b^{2} \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}}{\left (e x +d \right ) e}-\frac {b^{2} n^{2} \ln \left (x \right )^{2}}{e d}+\frac {2 b^{2} n^{2} \dilog \left (-\frac {e x}{d}\right )}{e d}-\frac {\left (-i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i b \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i b \pi \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 b \ln \left (c \right )+2 a \right )^{2}}{4 \left (e x +d \right ) e}+\frac {2 b^{2} n^{2} \ln \left (e x +d \right ) \ln \left (-\frac {e x}{d}\right )}{e d}-\frac {2 b \ln \left (x^{n}\right ) a}{\left (e x +d \right ) e}-\frac {2 \ln \left (x^{n}\right ) b^{2} \ln \left (c \right )}{\left (e x +d \right ) e}-\frac {b^{2} \ln \left (x^{n}\right )^{2}}{\left (e x +d \right ) e}+\frac {i n \ln \left (e x +d \right ) b^{2} \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{e d}-\frac {i n \ln \left (x \right ) b^{2} \pi \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{e d}\) \(755\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2/(e*x+d)^2,x,method=_RETURNVERBOSE)

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(I*c*x^n)^2+I/e*n/d*ln(x)*b^2*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d)^2,x, algorithm="maxima")

[Out]

-2*a*b*n*(e^(-1)*log(x*e + d)/d - e^(-1)*log(x)/d) - b^2*(log(x^n)^2/(x*e^2 + d*e) - integrate((x*e*log(c)^2 +
 2*((n + log(c))*x*e + d*n)*log(x^n))/(x^3*e^3 + 2*d*x^2*e^2 + d^2*x*e), x)) - 2*a*b*log(c*x^n)/(x*e^2 + d*e)
- a^2/(x*e^2 + d*e)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d)^2,x, algorithm="fricas")

[Out]

integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)/(x^2*e^2 + 2*d*x*e + d^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{\left (d + e x\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/(e*x+d)**2,x)

[Out]

Integral((a + b*log(c*x**n))**2/(d + e*x)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/(e*x+d)^2,x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)^2/(x*e + d)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{{\left (d+e\,x\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))^2/(d + e*x)^2,x)

[Out]

int((a + b*log(c*x^n))^2/(d + e*x)^2, x)

________________________________________________________________________________________